<template>
  <div>
    <MkCard>
      <MkForm :col="4" formId="123">
        <MkInput label="单号" v-model="searchParam.billNo" />
        <MkSelect v-model="searchParam.notificationStatus" label="通知状态"
			    :options="[{ mingCheng: '已通知', id: 1 }, { mingCheng: '未通知', id: 0 }]"/>
        <el-form-item label="通知时间">
          <MkDateTime v-model="searchParam.startTime" />
        </el-form-item>
        <el-form-item label="至">
          <MkDateTime v-model="searchParam.endTime" />
        </el-form-item>
      </MkForm>
		</MkCard>
    <MkCard>
      <div>
        <div class="head">
          <el-button @click="emit('goto-edit')" type="primary">返回</el-button>
        </div>
        <MkTable :data="list" border @row-dblclick="rowDbClick">
          <MkColumn label="申请单号" prop="billNo" />
          <MkColumn type="BillStatus" label="通知状态" prop="notificationStatus" /> 
          <MkColumn label="通知时间" prop="noticeTime" />>
          <el-table-column label="通知人" prop="noticeUserId" />
        </MkTable>
        <div style="text-align: center; width: 100%;">
          <MkPagination v-model:page="searchParam.page"
            v-model:pageSize="searchParam.pageSize"
            :total="total"
            @query="search" />
        </div>
      </div>
    </MkCard> 
  </div>
</template>

<script lang="ts" setup>
import { ref,reactive } from 'vue';
const emit = defineEmits(['goto-edit'])
interface Param {
  billNo?:string,
  notificationStatus?:number
  startTime?:string,
  endTime?:string,
  page:number,
  pageSize:number
}
const total = ref(0)
const searchParam = reactive<Param>({
  billNo:undefined,
  notificationStatus:undefined,
  startTime:undefined,
  endTime:undefined,
  page:1,
  pageSize:10
}) 
interface listDto {
  billNo:string
  notificationStatus?:number
  noticeTime?:string,
  noticeUserId?:number
}
const list = reactive<listDto[]>([
  {
    billNo:'单号1',
    notificationStatus:1,
    noticeTime:'2025-03-29',
    noticeUserId:2
  },
  {
    billNo:'单号2',
    notificationStatus:2,
    noticeTime:'2025-03-29',
    noticeUserId:3
  },
])

const search = () =>{

}
const notice = () =>{

}

const rowDbClick = () =>{

}
</script>

<style lang='scss' scoped>
/* 在这里添加你的样式 */
.head{
  padding: 0px 5px 5px 5px;
}
</style>